import service from '@/utils/request'
//get
export function getAction(url, params) {
    return service({
      url,
      method: 'get',
      params,
    })
  }

//post
export function postAction(url, data) {
  return axios({
    url,
    method: 'post',
    data,
  })
}

//postd
export function postdAction(url, params) {
  return axios({
    url: url + '?' + qs.stringify(params),
    method: 'post',
  })
}

//post method= {post | put}
export function httpAction(url, data, method) {
  return axios({
    url,
    method,
    data,
  })
}

//put
export function putAction(url, data) {
  return axios({
    url,
    method: 'put',
    data,
  })
}

//deleteAction
export function deleteAction(url, params) {
  return axios({
    url,
    method: 'delete',
    params,
  })
}